<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xn="http://www.renren.com/2009/xnml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="{{ staticUrl }}/img/favicon.ico" rel="itgeeker favorite icon" type="image/x-icon" />
    <link href="{{ staticUrl }}/css/layout.css?ver={{ cssVersion }}" rel="stylesheet" type="text/css" media="all" />
    <script type="text/javascript" src="{{ staticUrl }}/js/base.js?ver={{ jsVersion }}"></script>
    <script type="text/javascript" src="{{ staticUrl }}/js/ajax.js?ver={{ jsVersion }}"></script>
    <script type="text/javascript" src="{{ staticUrl }}/js/ebookmapping.js?ver={{ jsVersion }}"></script>
    <title>ITGeeker——专业的IT技术交流站点！</title>
</head>
<body>
    {% include "../inc/admin_navbar.inc" %}
    <br />
    <a target="_blank" href="/admin/editebookinfo">增加一本新电子书</a> | <a target="_blank" href="/admin/listebooks">查看所有电子书</a> 
    <br />
    <br />
    <table id="mappingTab">
        <tbody>
            <tr>
                <th>本站文章</th>
                <th>对应的推荐电子书</th>
                <th>映射优先级</th>
                <th>操作</th>
            </tr>
            {% for peMapping in paperEbookMappingList %}
                <tr id="mapping{{ peMapping.id }}">
                    <td><a target="_blank" href="/mathml/readpaper?pid={{ peMapping.pid }}">{{ peMapping.paperTitle }}</a></td>
                    <td><a target="_blank" href="/admin/ebookinfo?ebid={{ peMapping.ebid }}">{{ peMapping.ebookTitle }}</a></td>
                    <td>{{ peMapping.priority }}</td>
                    <td><a href="javascript:delMapping({{ peMapping.id }});">删除这条对应关系</a></td>
                </tr>
            {% endfor %}
            <tr id="mappingNew">
                <td><input id="pid" type="text" /></td>
                <td><input id="ebid" type="text" /></td>
                <td><input id="priority" type="text" /></td>
                <td><a href="javascript:addMapping();">增加对应关系</a></td>
            </tr>
        </tbody>
    </table>
</body>
</html>
